package com.bitdf.txing.chat.config;

//import com.alibaba.csp.sentinel.adapter.spring.webmvc.callback.BlockExceptionHandler;

//@Component
//public class SentinelConfig implements BlockExceptionHandler {
//    /**
//     * 指定限流返回页面
//     * @param request
//     * @param response
//     * @param e
//     * @throws Exception
//     */
//    @Override
//    public void handle(HttpServletRequest request, HttpServletResponse response, BlockException e) throws Exception {
//        R error= R.error(BizCodeEnume.TO_MANY_REQUEST_EXCEPTION.getCode(), BizCodeEnume.TO_MANY_REQUEST_EXCEPTION.getMsg());
//        response.setContentType("application/json;charset=utf-8");
//        response.getWriter().write(JSON.toJSONString(error));
//    }
//}
